<?php
$this->breadcrumbs = array(
	'All Users' => array('users/index'),
	$user->name => array('users/update', 'id' => $user->id),
	'Adjust Statistics for User'
);
?>

<div class="main-title">
    <h1 class="float-left">Adjust Statistics for User - <?php echo $user->name; ?></h1>
    <span class="controls">
    </span>
</div>
<div class="grid_16">
    <div class="form">
		<?php
		$form = $this->beginWidget('PsActiveForm', array(
			'id' => 'add-adjustment-form',
			'enableAjaxValidation' => false,
			'htmlOptions' => array(
				'class' => 'form'
			)
				));
		?>
        <div class="table-block">
            <table class="form-table">
                <tr>
                    <th scope="row" width="220">
						<?php echo $form->labelEx($scoreAdjustment, 'amount', array("label" => "Adjustment Amount ( '-' for negative )")); ?>
                    </th>
                    <td>
                        <div class="form-table-block">
							<?php echo $form->textField($scoreAdjustment, 'amount'); ?>
							<?php echo $form->error($scoreAdjustment, 'amount'); ?>
                        </div>
                    </td>
                </tr>
				<tr>
                    <th scope="row" width="220">
						<?php echo $form->labelEx($scoreAdjustment, 'criteria_type_code', array('label' => 'Statistic / Score to Adjust')); ?>
                    </th>
                    <td>
                        <div class="form-table-block">
							<?php echo $form->dropDownList($scoreAdjustment, 'criteria_type_code', CriteriaType::getCriteriaTypesListData(), array('prompt' => 'Select...')); ?>
							<?php echo $form->error($scoreAdjustment, 'criteria_type_code'); ?>
                        </div>
                    </td>
                </tr>
				<tr>
					<th scope="row" width="220">
						<?php echo $form->labelEx($scoreAdjustment, 'adjustment_effect_time', array('label' => 'Time the adjustment takes effect')); ?>
                    </th>
					<td>
						<?php
						$form->widget('CJuiDateTimePicker', array(
							'model' => $scoreAdjustment,
							'attribute' => 'adjustment_effect_time',
							'language' => '',
							'options' => array(
								'showButtonPanel' => false,
								'changeYear' => true,
								'dateFormat' => 'dd-mm-yy',
							),
						));
						?>
						<?php echo $form->error($scoreAdjustment, 'adjustment_effect_time'); ?>
					</td>
				</tr>
				<tr>
                    <th scope="row" width="220">
						<?php echo $form->labelEx($scoreAdjustment, 'reason'); ?>
                    </th>
                    <td>
                        <div class="form-table-block">
							<?php echo $form->textArea($scoreAdjustment, 'reason', array('cols' => '28')); ?>
							<?php echo $form->error($scoreAdjustment, 'reason'); ?>
                        </div>
                    </td>
                </tr>
				
                <tr>
                    <th scope="row" width="80"></th>
                    <td>
						<?php // echo GxHtml::submitButton('Save', array('name' => 'submit', 'class' => 'no-margin')); ?>
						<button id="submit-button" type="button" class="no-margin" >Save</button>
                    </td>
                </tr>
            </table>
        </div>
		<?php $this->endWidget(); ?>
    </div>
</div>